package com.yjc.hire.servicefile.config;

import com.yjc.hire.servicefile.utils.MinIoUtils;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * </p>
 *
 * @author jcyin
 * @since 2025/7/21
 * </p>
 */

@Configuration
@Data
public class MinioConfig {
    @Value("${minio.endpoint}")
    private String endpoint;

    @Value("${minio.fileHost}")
    private String fileHost;

    @Value("${minio.bucketName}")
    private String bucketName;

    @Value("${minio.accessKey}")
    private String accessKey;

    @Value("${minio.secretKey}")
    private String secretKey;

    @Bean
    public MinIoUtils minioClient() {
        return new MinIoUtils(endpoint,fileHost,bucketName,accessKey,secretKey);
    }
}
